Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use memoized fn in use-interval (#2029) #2070

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

kongmoumou
Copy link
Contributor

@kongmoumou kongmoumou commented Feb 20, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#2029

💡 Background and solution

使用 useMemoizedFn 替换 useLatest 解决与 devtool 冲突的问题

详见 #728 (comment)

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@kongmoumou
Copy link
Contributor Author

@li-jia-nan could u make a review 😂

@crazylxr crazylxr requested a review from li-jia-nan March 1, 2023 11:36
@li-jia-nan
Copy link
Collaborator

li-jia-nan commented Mar 2, 2023

感觉命名可以再优化一下,cb 有点敷衍了

@liuyib
Copy link
Collaborator

liuyib commented Mar 2, 2023

cb -> memoizedFn :)

@kongmoumou
Copy link
Contributor Author

@li-jia-nan @liuyib done

@li-jia-nan
Copy link
Collaborator

useTimeout 在 react devtools 中也有问题,顺便一起修了

@crazylxr crazylxr merged commit ef8624a into alibaba:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants